<?php include $this->tpl('public:common.php') ?>

<div class="btn-toolbar">
	<a href="/os/module/add" class="btn btn-primary"><i class="icon-plus"></i> 模块</a>
</div>
<div class="block">
	<a href="#page-stats" class="block-heading" data-toggle="collapse">模块列表</a>
	<div id="page-stats" class="block-body collapse in">
		<table class="table table-striped">
			<thead>
			<tr>
				<th>#</th>
				<th>模块名</th>
				<th>模块链接</th>
				<th>排序</th>
				<th>是否在线</th>
				<th>描述</th>
				<th>图标</th>
				<th width="80px">操作</th>
			</tr>
			</thead>
			<tbody>							  
			<?php foreach($modules as $module):?>
				 
				<tr>
				 
				<td><?=$module['module_id']?></td>
				<td><?=$module['module_name']?></td>
				<td><?=$module['module_url']?></td>
				<td><?=$module['module_sort']?></td>
				<td>
					<?php if($module['online']):?>
						在线
					<?php else:?>
						已下线
					<?php endif?>
				</td>
				<td><?=$module['module_desc']?></td>
				<td><i class="<?=$module['module_icon']?>"></i></td>
				<td>
				<a href="/os/module?module_id=<?=$module['module_id']?>" title= "菜单链接列表" ><i class="icon-list-alt"></i></a>
				&nbsp;
				<a href="/os/module/update?module_id=<?=$module['module_id']?>" title= "修改" ><i class="icon-pencil"></i></a>
				&nbsp;
				<?php if($module['module_id'] != 1 ):?>
				<a data-toggle="modal" href="#myModal"  title= "删除" ><i class="icon-remove" href="/os/module/delete?module_id=<?=$module['module_id']?>"></i></a>
				<?php endif?>
				</td>
				</tr>
			<?php endforeach?>
		  </tbody>
		</table>  
	</div>
</div>

	
<?php include $this->tpl('public:footer.php') ?>